﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "IEventArgs.h"

namespace gcmp
{
    /// \brief 插件事件类型
    enum class AddinEventType : int32_t
    {
        Unknown = -1,   /// < 未知
        Load = 0,       /// < 加载
        Unload = 1      /// < 卸载
    };

    struct Any;
    class IEvent;

    /// \brief 插件事件参数
    class IAddinEventArgs : public IEventArgs
    {
    public:
        /// \brief 获取插件事件类型
        /// \return 插件事件类型
        virtual AddinEventType GetType() const = 0;

        /// \brief 获取事件数据
        /// \return 事件数据
        virtual const Any & GetData() const = 0;

        /// \brief 发送事件
        virtual void SetEvent(IEvent * pEvent) = 0;
    };
}
